package com.tzl.design_pattern.decorator_pattern;

import java.math.BigDecimal;

/**
 * 蛋糕的装饰器类,内部持有蛋糕的对象
 *
 * @author Zhilei Tang
 * @date Created in 2020/11/16 20:50
 */
public class CakeDecorator extends Cake {

  private final Cake cake;

  public CakeDecorator(Cake cake) {
    this.cake = cake;
  }

  @Override
  public String getCakeMsg() {
    return this.cake.getCakeMsg();
  }

  @Override
  public BigDecimal getPrice() {
    return this.cake.getPrice();
  }
}
